This application is based on Patent Application No. HEI-11-151047 filed in Japan, the content of which is hereby incorporated by reference.
1. Field of the Invention
The present invention relates to a method and device for aligning the position of data that expresses a three-dimensional shape obtained by photographing an object, and specifically relates to a method and device for high precision position alignment after approximate position alignment.
2. Description of the Related Art
An example of a conventional three-dimensional measuring device (three-dimensional data input or acquiring device) for capturing data expressing a three-dimensional shape (hereinafter referred to as xe2x80x9cthree-dimensional dataxe2x80x9d) by photographing an object is disclosed in Japanese Laid-Open Patent Pubplication No. HEI 10-2712.
Using this three-dimensional measuring device it is possible to input three-dimensional data of an object rapidly and without contact. Furthermore, a two-dimensional image can be simultaneously obtained from the three-dimensional data by providing a shared optical system for obtaining the three-dimensional data and an optical system for obtaining the two-dimensional image (two-dimensional data).
Using such a three-dimensional measuring device, an object is photographed a plurality of times from relatively different directions or aspects to synthesize three-dimensional data of each obtained aspect so as to generate three-dimensional data to the entirety of the object. In order to synthesize a single three-dimensional data set by connecting adjoining three-dimensional data, the three-dimensional data of both sets must be positionally aligned.
A conversion matrix between the two sets of three-dimensional data must be determined to accomplish positional alignment of three-dimensional data. The conversion matrix can be determined from the correspondences between the two sets of three-dimensional data. Methods (1) and (2) below are methods for determining correspondences.
(1) Method for determining a conversion matrix from the geometric shape of an object
An example of method (1) is the iterative closest point (ICP) disclosed in U.S. Pat. No. 5,715,166. According to this method, with the two sets of three-dimensional data in a state of approximate positional alignment, one three-dimensional data set is used as a standard and the point (closest neighbor point) on the other three-dimensional data set having the shortest distance from a point on the standard three-dimensional data set is determined as a correspondence point, and correspondence points are determined for each point of the standard three-dimensional data set. Then, the amount of movement is calculated when the sum of the distances to the neighbor points after moving the three-dimensional data is minimum.
(2) Method for determining a conversion matrix from texture information (two-dimensional image information) of an object
An example of method (2) is disclosed in Japanese Laid-Open Patent Publication No. HEI 5-303629. According to this method, a two-dimensional image and three-dimensional data are resampled to achieve a one-to-one correspondence, so as to mutually match the resolution of two two-dimensional images in actual space. After resampling, correlation values are determine across the entire surface from both two-dimensional images, and mutually overlapping areas are extracted. The amount of movement needed to minimize the distance between the two sets of three-dimensional data is determined for the extracted overlapping areas.
Method (3) below is a method for achieving positional alignment without determining correspondence between three-dimensional data.
(3) Method for determining a conversion matrix by measuring position and posture of an object during photography
Method (1) is a method for mapping sets of three-dimensional data based on features of shape such as edge and curvature of surfaces of an object. However, this method is unsuitable for objects which do not have major features of three-dimensional shape.
In method (2), for example, three-dimensional data are acquired and a two-dimensional image is photographed simultaneously, and mapping is accomplished using optical flow, a correlation method or the like on the two two-dimensional images. According to this method, mapping can be accomplished if there are texture characteristics (characteristics in two-dimensional image) even when the three-dimensional shape has no major feature. However, mapping requires searching all texture, with a resulting disadvantageous calculation cost. Furthermore, correspondence errors readily occur when there are numerous similar features in texture.
Method (3) mounts a position sensor and a posture sensor on the object or the three-dimensional measuring device, rotates the object via a turntable while the three-dimensional measuring device remains stationary, and determines a conversion matrix from the parameters between the device and the object. In this method, it is unnecessary to determine the association between three-dimensional data, but extremely high precision of each sensor, precision of rotational angle of the turntable, and precision of core deflection of rotational axis are required. Moreover, many limitations are imposed during use in order to maintain precision.
In view of the previously described disadvantages, an object of the present invention is to accomplish high precision positional alignment at low calculation cost by enabling high reliability mapping even when the shape of an object does not present major characteristics when approximate positional alignment of two sets of three-dimensional data has been accomplished beforehand.
One aspect of the present invention is a method for achieving positional alignment of two sets of three-dimensional data obtained by photographing an object from different directions, and is a data processing method comprising a step of converting both sets or one set of two sets of three-dimensional data to a common coordinate system to accomplish approximate positional alignment, a step of projecting the two sets of three-dimensional data subjected to approximate positional alignment from a single common viewpoint onto a single common projection surface to generate two two-dimensional images, and a step of correcting positional dislocation of the two sets of three-dimensional data by evaluating the dislocation of the two two-dimensional images.
Another aspect of the present invention is a method for achieving positional alignment of a first set of three-dimensional data and a second set of three-dimensional data obtained by photographing an object from different directions, and is a data processing method comprising a step of converting the second set of three-dimensional data to the coordinate system of the first set of three-dimensional data to accomplish approximate positional alignment, a step of projecting the second set of three-dimensional data subjected to approximate positional alignment from a single common viewpoint onto a single common projection surface to generate a projection two-dimensional image, and a step of correcting positional dislocation of the first set of three-dimensional data and the second set of three-dimensional data by evaluating the dislocation of the projection two-dimensional image and a first two-dimensional image corresponding to the first three-dimensional data.
The aforesaid evaluations are accomplished by a correlation method.
The aforesaid evaluations are accomplished using an optical flow.
Another aspect of the present invention is a method for evaluating the precision of positional alignment of two sets of three-dimensional data obtained by photographing an object from different directions, and is an evaluation method comprising a step of projecting the two sets of three-dimensional data from a single common viewpoint onto a single common projection surface to generate two two-dimensional images, and a step of evaluating the dislocation of the two two-dimensional images.
A still further aspect of the present invention is a device for achieving positional alignment of a first set of three-dimensional data and a second set of three-dimensional data obtained by photographing an object from different directions, and is a data processing device for prosecuting steps of converting the second set of three-dimensional data to the coordinate system of the first set of three-dimensional data to accomplish approximate positional alignment, projecting the second set of three-dimensional data subjected to approximate positional alignment from a single common viewpoint onto a single common projection surface to generate a projection two-dimensional image, evaluating dislocation of the projection two-dimensional image and a first two-dimensional image corresponding to the first set of three-dimensional data, and correcting positional dislocation of the first set of three-dimensional data and the second set of three-dimensional data based on the evaluation result.
In the step of projecting three-dimensional data from a common viewpoint onto a projection surface to generate two-dimensional images, the projection need not be actually carried out so long as the two-dimensional image is ultimately obtained. For example, when a two-dimensional image already exists from a certain viewpoint, that two-dimensional image may be used.
These and other objects, advantages and features of the invention will become apparent from the following description thereof taken in conjunction with the accompanying drawings, which illustrate specific embodiments of the invention.